package com.ruoyi.exam.domain.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 错题本对象 t_wrong_question
 * 
 * @author ruoyi
 * @date 2024-12-27
 */
public class TWrongQuestion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 题目ID */
    @Excel(name = "题目I，关联的表为t_exam_paper_question")
    private Long questionId;

    /** 做错次数 */
    @Excel(name = "做错次数")
    private Long wrongCount;

    /** 最后一次做错时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后一次做错时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastWrongTime;

    /** 最后一次的错误答案 */
    @Excel(name = "最后一次的错误答案")
    private String lastAnswer;

    /** 删除标志（0代表存在 1代表删除） */
    private Integer deleted;

    /** 是否每日一练的错题 */
    private Integer isdaily;

    /** 非数据库字段 */
    private ExamPaperQuestion examPaperQuestion; // 关联的题目信息

    public Integer getIsdaily() {
        return isdaily;
    }

    public void setIsdaily(Integer isdaily) {
        this.isdaily = isdaily;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public Long getQuestionId() {
        return questionId;
    }

    public void setWrongCount(Long wrongCount) {
        this.wrongCount = wrongCount;
    }

    public Long getWrongCount() {
        return wrongCount;
    }

    public void setLastWrongTime(Date lastWrongTime) {
        this.lastWrongTime = lastWrongTime;
    }

    public Date getLastWrongTime() {
        return lastWrongTime;
    }

    public void setLastAnswer(String lastAnswer) {
        this.lastAnswer = lastAnswer;
    }

    public String getLastAnswer() {
        return lastAnswer;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public ExamPaperQuestion getQuestion() {
        return examPaperQuestion;
    }

    public void setQuestion(ExamPaperQuestion examPaperQuestion) {
        this.examPaperQuestion = examPaperQuestion;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("questionId", getQuestionId())
                .append("wrongCount", getWrongCount())
                .append("lastWrongTime", getLastWrongTime())
                .append("lastAnswer", getLastAnswer())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("examPaperQuestion", getQuestion())
                .toString();
    }
}
